package com.tutou.mcpdemo.config;

import com.tutou.mcpdemo.service.McpToosService;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author wangyoubao
 * @createDate 2025/5/28 10:44
 * @Description
 */
@Configuration
public class McpConfig {


    @Bean
    public ToolCallbackProvider tools(McpToosService mcpToosService){
        return MethodToolCallbackProvider.builder().toolObjects(mcpToosService).build();
    }
}


